/*****************************************************************************/
/* CS 230 Final Project                                                      */
/* events.h					                                                 */
/*                                                                           */
/* Created by Even Cheng and Shu-Chi Hsu                                     */
/* Copyright 2011 GNU GPL v3                                                 */
/*****************************************************************************/

#ifndef EVENT_H
#define EVENT_H

#include "global.h"
#include "graph.h"

class events
{
public:
	events();
	~events();

	graph thisGraph;
	node thisNode;

	element *head;
	element *tail;

	int nodesReceivedMessage;
	
	bool insertEventAtTimeT(int thisTime, element *targetElement);
	bool removeHead(int thisTime, element *targetElement);
	void sort();
	void info();
	int simulate(graph *sim, int t,int *);
};

#endif